<template>
	<view class="business">
		<view class="top-img">
			<image src="https://lives-1308318918.cos.ap-shanghai.myqcloud.com/img/inte/icon_header.png" mode="widthFix"></image>
		</view>
		<view class="ruzhu">
			<view class="ruzhu-item disp flex-col centent js-center" v-for="(item, key) in list" :key="key" @click="toXieyi(key)">
				<image :src="'https://lives-1308318918.cos.ap-shanghai.myqcloud.com/img/inte/icon_' + key + '.png'"></image>
				<view>{{item}}</view>
			</view>
		</view>
		<view class="bottom-img">
			<image src="https://lives-1308318918.cos.ap-shanghai.myqcloud.com/img/inte/icon_bot.png" mode="widthFix"></image>
		</view>
		
		
		<view class="bottom-btn">
			<button>联系我们:{{chatConfig.consumer_hotline}}</button>
		</view>
		
		<jyf-parser class="web-view" :html="info.content" :tag-style="tagStyle"></jyf-parser>
		
	</view>
</template>

<script>
	import parser from "@/components/jyf-parser/jyf-parser";
	import {
		getIllnessInfo
	} from "@/api/summer.js"
	export default {
		components: {
			"jyf-parser": parser
		},
		data() {
			return {
				list: ['入驻规则', '收费标准', '入驻材料', '入驻咨询'],
				chatConfig: {
					consumer_hotline:'',
					telephone_service_switch:'0'
				},
				tagStyle: {
					img: 'width:100%;display:block;',
					table: 'width:100%',
					video: 'width:100%'
				},
				info: {}
			}
		},
		mounted() {
			this.$set(this,'chatConfig',this.$Cache.getItem('chatConfig'));
			this.getVrInfos(6);
		},
		
		methods:{
			toXieyi(xieyi) {
				console.log(xieyi);
				let id = 0;
				if (xieyi == 0) {
					id = 2;
				}else if (xieyi == 1) {
					id = 3;
				}else if (xieyi == 2) {
					id = 4;
				}else if (xieyi == 3) {
					id = 5;
				}
				uni.navigateTo({
					url: `/pages/students/web/index?id=${id}`
				})
			},
			
			getVrInfos(vrId) {
				this.m_show("加载中");
				getIllnessInfo(vrId).then(res => {
					console.log(res);
					this.info = res.data;
					this.m_hide();
				})
			}
			
		}
	}
</script>

<style scoped lang="scss" scoped>
	page {
		background-color: #fff;
	}
	
	.bottom-btn {
		width: 60%;
		margin: 50rpx auto;

		button {
			padding: 20rpx;
			font-size: 32rpx;
			background-color: #007E51;
			color: white;

		}
	}

	.bottom-img {
		width: 80%;
		height: 200rpx;
		margin: 50rpx auto;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.ruzhu {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		margin-top: 50rpx;
	}

	.ruzhu-item {
		width: 40%;
		padding: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		
		view {
			text-align: center;
			width: 100%;
		}
		image {
			width: 50rpx;
			height: 50rpx;
		}
	}

	.top-img {
		height: 292rpx;
		image {
			width: 100%;
			height: 100%;
		}
	}
</style>